From dab8fa61b13f8fbaef9facd0bdc9b82a7b58f8c5 Mon Sep 17 00:00:00 2001 From: robertl Date: Sun, 20 Dec 2009 20:21:24 +0000 Subject: [PATCH] Turn on Bushnell in default build. Add tests. --- gpsbabel/bushnell.c | 2 +- gpsbabel/naviguide.c | 3 --- gpsbabel/testo | 2 ++ gpsbabel/testo.d/bushnell.test | 11 +++++++++++ gpsbabel/vecs.c | 2 -- 5 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 gpsbabel/testo.d/bushnell.test diff --git a/gpsbabel/bushnell.c b/gpsbabel/bushnell.c index ab943dd15..0b7a0403f 100644 --- a/gpsbabel/bushnell.c +++ b/gpsbabel/bushnell.c @@ -188,7 +188,7 @@ bushnell_read(void) { icon = gbfgetc(file_in); wpt_tmp->icon_descr = bushnell_get_name_from_symbol(icon); unknown = gbfgetc(file_in); - wpt_tmp->latitude = lat_tmp / 10000000.0; + wpt_tmp->latitude = lat_tmp / 10000000.0; wpt_tmp->longitude = lon_tmp / 10000000.0; // Apparently this is always zero terminated, though it's never been diff --git a/gpsbabel/naviguide.c b/gpsbabel/naviguide.c index 82c530a98..bdcb701ca 100755 --- a/gpsbabel/naviguide.c +++ b/gpsbabel/naviguide.c @@ -70,7 +70,6 @@ typedef struct { /* Global variables */ static gbfile *file_in, *file_out; -static short_handle mkshort_handle; static gbuint16 nof_wp; static route_head *rte_head; static ng_file_header_t ng_file_header; @@ -314,7 +313,6 @@ rd_init(const char *fname) { file_in = gbfopen_le(fname, "rb", MYNAME); - mkshort_handle = mkshort_new_handle(); ng_read_file_header(); if (NULL != process) { @@ -330,7 +328,6 @@ rd_deinit(void) { gbfclose(file_in); file_in = NULL; - mkshort_del_handle(&mkshort_handle); } diff --git a/gpsbabel/testo b/gpsbabel/testo index 8e3471c88..a1e014f2c 100755 --- a/gpsbabel/testo +++ b/gpsbabel/testo @@ -30,6 +30,8 @@ bincompare() ${OD} $2 >${TMPDIR}/bc2 ${DIFF} ${TMPDIR}/bc1 ${TMPDIR}/bc2 || { echo ERROR binary comparing $* +cat ${TMPDIR}/bc1 +cat ${TMPDIR}/bc2 exit 1 } } diff --git a/gpsbabel/testo.d/bushnell.test b/gpsbabel/testo.d/bushnell.test new file mode 100644 index 000000000..3b5ae7a62 --- /dev/null +++ b/gpsbabel/testo.d/bushnell.test @@ -0,0 +1,11 @@ +rm -f ${TMPDIR}/bushnell.* +gpsbabel -i bushnell -f ${REFERENCE}/bushnell.wpt -o gpx -F ${TMPDIR}/bushnell.gpx +compare ${REFERENCE}/bushnell.gpx ${TMPDIR}/bushnell.gpx + +# This format has a goofy output naming convention; each wpt must be in a +# unique file, so the output name is a template. +gpsbabel -i bushnell -f ${REFERENCE}/bushnell.wpt -o bushnell -F ${TMPDIR}/bushnell +# bincompare ${REFERENCE}/bushnell.wpt ${TMPDIR}/bushnell-0.wpt + +gpsbabel -i bushnell_trl -f ${REFERENCE}/bushnell_trl.trl -o gpx -F ${TMPDIR}/bushnell_trl.gpx +compare ${REFERENCE}/bushnell_trl.gpx ${TMPDIR}/bushnell_trl.gpx diff --git a/gpsbabel/vecs.c b/gpsbabel/vecs.c index 2be6dce4d..03cc09e95 100644 --- a/gpsbabel/vecs.c +++ b/gpsbabel/vecs.c @@ -914,7 +914,6 @@ vecs_t vec_list[] = { "Memory-Map Navigator overlay files (.mmo)", "mmo" }, -#if PLANE || 1 { &bushnell_vecs, "bushnell", @@ -927,7 +926,6 @@ vecs_t vec_list[] = { "Bushnell GPS Trail file", "trl" }, -#endif { &skyforce_vecs, "skyforce", -- 2.30.2